﻿#pragma once
#include "Support/rapidjson/JsonIOHandler.h"
#include "LandedTitles.h"
#include "Data/ScriptData/Allow/AllowIO.h"

class CLandedTitlesReaderHandle :
	public BaseReaderHandler<_stLandedTitlesProperty>
{
public:
	CLandedTitlesReaderHandle(std::unordered_map<std::wstring, _stLandedTitlesProperty>* map);
	bool HandleBool(const std::wstring& key, bool b);
	bool HandleInt(const std::wstring& key, int i);
	bool HandleDouble(const std::wstring& key, double d);
	bool HandleString(const std::wstring& key, const std::wstring& str);
	bool HandleStartObj(const std::wstring& key);
	bool HandleEndObj();

private:
	bool m_bKeyInAllow = false;		// 是否在"allow"嵌套中
	bool m_bKeyInGainEffect = false;	// 是否在"gain_effect"嵌套中

	CAllowReaderHandle m_AllowReaderHandle;		// 处理allow内部语句
};